﻿using System;
using System.Collections.Generic;

namespace XamlMvp.Controls
{
    public class MvpNavigationEventArgs : EventArgs, IPresenterContext
    {
        readonly IDictionary<string, object> state;
        readonly MvpPage content;
#if WINDOWS_PHONE
        readonly bool isTombstone;

        public MvpNavigationEventArgs(MvpPage content, IDictionary<string, object> state, bool isTombstone)
        {
            this.content = content;
            this.state = state;
            this.isTombstone = isTombstone;
        }
        public bool IsTombstone { get { return isTombstone; } }
        public bool WasApplicationInstancePreserved
        {
            get
            {
                return false;
            }
        }
#else
        public MvpNavigationEventArgs(MvpPage content, IDictionary<string, object> state)
        {
            this.content = content;
            this.state = state;
        }
#endif
        public IDictionary<string, object> State { get { return state; } }

        public MvpPage Content { get { return content; } }
    }
}
